package com.lmt_15;

import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

public class CallAbleTest {
    public static void main(String[] args) throws Exception {
        Callable<String> callable = new Mycallable(200);
        FutureTask<String> futureTask = new FutureTask<>(callable);
        new Thread(futureTask).start();

        String s = futureTask.get();
        System.out.println(s);
    }
}
